#ifndef MYCALLBACK_H
#define MYCALLBACK_H

#include "irm_callbacks.h"

using namespace ophies;

class MyStudiesCallbackNested;
class COphies;

class MyInstancesCallback : public DcmInstancesCallback
{
    IrmMain* irmMain;
    DcmSeries* parentSeries;
    MyStudiesCallbackNested* m_studiesCallbackNested;

public:
    MyInstancesCallback(IrmMain* irmMain, DcmSeries *parentSeries, QObject *parent);
    virtual void myObjectHandler(DataModel *object);
    virtual void myListHandler(QList<DataModel *> *list);
};

////////////////////////////////////////////////////////////////

class MySeriesCallback : public DcmSeriesCallback
{
    IrmMain* irmMain;
    DcmStudy* parentStudy;
    QList<MyInstancesCallback*> *instancesCallbacks;

public:
    MySeriesCallback(IrmMain* irmMain, DcmStudy *parentStudy, QObject *parent);
    virtual void myObjectHandler(DataModel *object);
    virtual void myListHandler(QList<DataModel *> *list);
};

/////////////////////////////////////////////////////////////////



class MyStudiesCallback : public DcmStudiesCallback
{
    IrmMain* irmMain;
    QList<MySeriesCallback*> *seriesCallbacks;

public:
    MyStudiesCallback(IrmMain* irmMain, QObject *parent);
    virtual ~MyStudiesCallback();
    virtual void myObjectHandler(DataModel *object);
    virtual void myListHandler(QList<DataModel *> *list);
};

//////////////////////////////////////////////////////////////////

class MyStudiesCallbackNested : public DcmStudiesCallback
{
public:
	MyStudiesCallbackNested(IrmMain* irmMain, COphies* pOphies, QObject *parent);
	virtual ~MyStudiesCallbackNested();

public:
    virtual void myObjectHandler(DataModel *object);
    virtual void myListHandler(QList<DataModel *> *list);

public:
	COphies*	m_pNotify;

	IrmMain*	m_irmMain;
	
	QList<MySeriesCallback*> *m_seriesCallbacks;
};



#endif // MYCALLBACK_H
